<template>
  <van-tabs v-model:active="active" @click-tab="handleSelectTab">
    <van-tab title="标签 1">内容 1</van-tab>
    <van-tab title="标签 2">内容 2</van-tab>
    <van-tab title="标签 3">内容 3</van-tab>
    <van-tab title="标签 4">内容 4</van-tab>
  </van-tabs>
</template>

<script lang="ts" setup>
import { ref, onMounted } from 'vue'
import api from '@/api'

let active = ref(0)

onMounted(() => {
  api.handleGetHomeTabs().then((res) => {
    console.log(res)
  })
})

const handleSelectTab = (val: unknown) => {
  console.log(val)
}
</script>

<style lang="less" scoped>
</style>
